<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'message.label', default: 'Message')}"/>
    <title>消息管理</title>
</head>

<body>
<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>消息记录</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">消息记录</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">
            <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>消息记录</h5>

                    <div class="card-header-right">
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">

                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">
                            <table class="table table-striped  table-bordered table-hover">
                                <thead>
                                <tr>
                                    <g:sortableColumn property="authority"
                                                      title="${message(code: 'message.authority.label', default: '手机号')}"/>
                                    <g:sortableColumn property="authority"
                                                      title="${message(code: 'message.authority.label', default: '消息状态')}"/>
                                    <g:sortableColumn property="authority"
                                                      title="${message(code: 'message.authority.label', default: '消息内容')}"/>
                                    <g:sortableColumn property="authority"
                                                      title="${message(code: 'message.authority.label', default: '发送平台')}"/>
                                    <g:sortableColumn property="authority"
                                                      title="${message(code: 'message.authority.label', default: '发送时间')}"/>
                                    <g:sortableColumn property="authority"
                                                      title="${message(code: 'message.authority.label', default: '类型')}"/>
                                </tr>
                                </thead>
                                <tbody>
                                <g:each in="${messageList}">
                                    <tr>
                                        <td class="cellphoneFormat">${it.cellphone}</td>
                                        <td>${it.status}</td>
                                        <td>${it.text}</td>
                                        <td>${it.platform}</td>
                                        <td><g:formatDate format="yyyy-MM-dd HH:mm:ss" date="${it.createdDate}"/></td>
                                        <td>${it.type}</td>
                                    </tr>
                                </g:each>
                                </tbody>
                            </table>

                            <div class="dataTables_paginate">
                                <div class="pagination">
                                    <g:paginate total="${messageCount ?: 0}" params="${params}"/>
                                </div>
                            </div>
                        </div>

                    </div>

                </div>
            </div>
            <!-- Hover table card end -->
        </div>

        <!-- Page-body end -->
    </div>
</div>
</body>
</html>